package com.huoyun.user.service;

import com.huoyun.user.bean.PasswordLink;
import com.huoyun.user.dao.PasswordLinkDao;

public class PasswordLinkServiceImpl implements PasswordLinkService {

	private PasswordLinkDao passwordLinkDao;

	public PasswordLinkDao getPasswordLinkDao() {
		return passwordLinkDao;
	}

	public void setPasswordLinkDao(PasswordLinkDao passwordLinkDao) {
		this.passwordLinkDao = passwordLinkDao;
	}

	@Override
	public void saveAll(PasswordLink link) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.saveAll(link);
	}

	@Override
	public void updateAll(PasswordLink link) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.updateAll(link);
	}

	@Override
	public PasswordLink getPasswordLinkById(long linkId) {
		// TODO Auto-generated method stub
		return this.passwordLinkDao.queryById(linkId);
	}

	@Override
	public void deleteById(long linkId) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.deleteById(linkId);
	}

	@Override
	public void updateUrl(long linkId, String url) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.updateUrl(linkId, url);
	}

	@Override
	public void updateUserId(long linkId, long userId) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.updateUserId(linkId, userId);
	}

	@Override
	public void deleteByUserId(long userId) {
		// TODO Auto-generated method stub
		this.passwordLinkDao.deleteByUserId(userId);
	}
}
